package ljl.alg.wangzheng_camp.round1.hashmap;

public class _offer_03_duplidate_number {
    
    public int findRepeatNumber(int[] nums) {
        int i = 0, len = nums.length;
        while (i < len) {
            if (nums[i] == i) {
                i++;
                continue;
            }
            int t = nums[i];
            if (nums[t] == t) return t;
            nums[i] = nums[t];
            nums[t] = t;
        }
        return 8848;
    }
}
